package de.nabble.model;

import java.awt.Graphics2D;

import de.nabble.gui.Paintable;

public class Field implements Paintable {
	
	public static final int NORMAL_WORD_WORTHINESS = 1;
	public static final int DOUBLE_WORD_WORTHINESS = 2;
	public static final int TRIPLE_WORD_WORTHINESS = 3;
	
	public static final int NORMAL_LETTER_WORTHINESS = 1;
	public static final int DOUBLE_LETTER_WORTHINESS = 2;
	public static final int TRIPLE_LETTER_WORTHINESS = 3;
	
	private int wordWorthiness;
	private int letterWorthiness;
	
	private Letter letter = null;
	
	public Field() {
		wordWorthiness = NORMAL_WORD_WORTHINESS;
		letterWorthiness = NORMAL_LETTER_WORTHINESS;
	}
	
	public void setLetter(Letter letter) {
		this.letter = letter;
	}
	
	public Letter getLetter() {
		return letter;
	}
	
	public int getWordWorthiness() {
		return wordWorthiness;
	}
	
	public int getLetterWorthiness() {
		return letterWorthiness;
	}
	
	public void setWordWorthiness(int wordWorthiness) {
		this.wordWorthiness = wordWorthiness;
	}
	
	public void setLetterWorthiness(int letterWorthiness) {
		this.letterWorthiness = letterWorthiness;
	}
	
	@Override
	public String toString() {
		return wordWorthiness != 1 ? "w"+wordWorthiness : "b"+letterWorthiness;
	}

	@Override
	public void paint(Graphics2D g) {
		
	}
}
